#lang racket


(require "../matrix.rkt"
         "../point.rkt")

(require "domain.rkt"
         "parametric-curve.rkt")


(provide make-parametric-arc
         parametric-arc-radius
         parametric-arc-angle)


(define-struct (parametric-arc parametric-curve)
  (radius angle)
  #:constructor-name new-parametric-arc)

(define (parametric-arc-object radius angle)
  (λ (t)
    (pol radius (* t angle))))

(define (parametric-arc-tangent radius angle)
  (λ (t)
    (error 'parametric-arc-tangent "Closure not implemented")))

(define (parametric-arc-normal radius angle)
  (λ (t)
    (error 'parametric-arc-normal "Closure not implemented")))

(define (parametric-arc-binormal radius angle)
  (λ (t)
    (error 'parametric-arc-binormal "Closure not implemented")))

(define (make-parametric-arc transformation radius angle)
  (new-parametric-arc
   (make-domain 'closed 0 'closed angle)
   (parametric-arc-object radius angle)
   (parametric-arc-tangent radius angle)
   (parametric-arc-normal radius angle)
   (parametric-arc-binormal radius angle)
   transformation
   radius
   angle))